import { Tools } from 'weaver-mobile';
import DocConstant from '../util/index';

const catchApiError = DocConstant.catchApiError;
export const afterSave = (params) =>
  Tools.callApi({url: '/api/doc/mobile/systemDoc/afterSave', method: 'GET', params}).then(catchApiError);

export const shareList = (params) =>
  Tools.callApi({url: '/api/doc/mobile/systemDoc/shareList', method: 'GET', params}).then(catchApiError);

export const shareCanEdit = (params) =>
  Tools.callApi({url: '/api/doc/mobile/systemDoc/canEdit', method: 'GET', params}).then(catchApiError);
export const getShareCondition = (params) =>
  Tools.callApi({url: '/api/doc/share/addShare', method: 'GET', params}).then(catchApiError);
export const deleteShare = (params) =>
  Tools.callApi({url: '/api/doc/share/deleteShare', method: 'GET', params}).then(catchApiError);
export const saveShare = (params) =>
  Tools.callApi({url: '/api/doc/share/saveShare', method: 'POST', params}).then(catchApiError);